Lodash中文网 | 您所在的位置:网站首页 › html webpack plugin 依赖lodash › Lodash中文网 |
_.defaults({ 'a': 1 }, { 'a': 3, 'b': 2 });// → { 'a': 1, 'b': 2 }_.partition([1, 2, 3, 4], n => n % 2);// → [[1, 3], [2, 4]]
Lodash 采用 MIT license 协议发布,并且支持最新的运行环境。 检查 构建差异 并选择一个适合您的构建差异。 安装In a browser: 通过 npm: $ npm i -g npm$ npm i --save lodashNode.js: // Load the full build.var _ = require('lodash');// Load the core build.var _ = require('lodash/core');// Load the FP build for immutable auto-curried iteratee-first data-last methods.var fp = require('lodash/fp'); // Load method categories.var array = require('lodash/array');var object = require('lodash/fp/object'); // Cherry-pick methods for smaller browserify/rollup/webpack bundles.var at = require('lodash/at');var curryN = require('lodash/fp/curryN');注意:Install n_ for Lodash use in the Node.js < 6 REPL. 为什么选择 Lodash?Lodash 通过降低 array、number、objects、string 等等的使用难度从而让 JavaScript 变得更简单。 Lodash 的模块化方法 非常适用于: 遍历 array、object 和 string 对值进行操作和检测 创建符合功能的函数 模块格式Lodash is available in a variety of builds & module formats. lodash & per method packages lodash-es, babel-plugin-lodash, & lodash-webpack-plugin lodash/fp lodash-amd 补充工具 futil-js is a set of functional utilities designed to complement lodash 扩展阅读 Contributing Release Notes Wiki (Changelog, Roadmap, etc.) 支持Tested in Chrome 65-66, Firefox 58-59, IE 11, Edge 16, Safari 10-11, Node.js 6-10, & PhantomJS 2.1.1. Automated browser & CI test runs are available. |
下载
Core build (~4kB gzipped)
Full build (~24kB gzipped)
CDN 副本
CopyRight 2018-2019 实验室设备网 版权所有 |